package cn.hg.solon.youcan.system.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;

import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import cn.hg.solon.youcan.system.entity.SysUser;

/**
 * @author 胡高
 */
public interface SysUserService extends IService<SysUser> {

    void assignRole(SysUser user, Integer[] roleIds);

    boolean checkUnique(SysUser bean);

    SysUser getByAccount(String account);

    Page<SysUser> pageByMap(Page<SysUser> page, Map<String, Object> paraMap);

    @Override
    boolean removeByIds(Collection<? extends Serializable> ids);

    void resetPassword(Integer userId, String oldPassword, String newPassword, SysUser editor);

    void resetPassword(SysUser user, String password, SysUser editor);

    @Override
    boolean save(SysUser bean);

    boolean update(SysUser bean);
}
